package com.tian.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.util.List;

@Data
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
@TableName("hospital")
public class Hospital {
    @TableId(type = IdType.AUTO)
    private Integer id;
    private String name;
    private String massage;
    private Integer parentId;

    @TableField(exist = false)
    private List<Hospital> children;

}
